package com.snap.vseries.bean;

import java.io.Serializable;
import java.util.List;

import io.protostuff.Tag;

/**
 * 实验项目
 */
public class TemplateInfo implements Serializable, Cloneable {

    //通道是否参与实验
    @Tag(1)
    private boolean famEnable;
    @Tag(2)
    private boolean vicEnable;
    @Tag(3)
    private boolean roxEnable;
    @Tag(4)
    private boolean cy5Enable;

    @Tag(5)
    private String famProbe;
    @Tag(6)
    private String vicProbe;
    @Tag(7)
    private String roxProbe;
    @Tag(8)
    private String cy5Probe;

    @Tag(9)
    private int tag;//标准品定量，四种
    @Tag(10)
    private int analyzeType;//分析方法  0自动 1手动
    @Tag(11)
    private int expMethod;//实验方法 0定量 1定性 2溶解

    @Tag(12)
    private List<ProgramStage> PCRProgram;    //PCR程序

    public int getChannelJoinFlag() {
        int flag = 0;
        if (famEnable) {
            flag |= 1;
        }
        if (vicEnable) {
            flag |= 1 << 1;
        }
        if (roxEnable) {
            flag |= 1 << 2;
        }
        if (cy5Enable) {
            flag |= 1 << 3;
        }
        return flag;
    }

    public boolean isFamEnable() {
        return famEnable;
    }

    public void setFamEnable(boolean famEnable) {
        this.famEnable = famEnable;
    }

    public boolean isVicEnable() {
        return vicEnable;
    }

    public void setVicEnable(boolean vicEnable) {
        this.vicEnable = vicEnable;
    }

    public boolean isRoxEnable() {
        return roxEnable;
    }

    public void setRoxEnable(boolean roxEnable) {
        this.roxEnable = roxEnable;
    }

    public boolean isCy5Enable() {
        return cy5Enable;
    }

    public void setCy5Enable(boolean cy5Enable) {
        this.cy5Enable = cy5Enable;
    }

    public String getFamProbe() {
        return famProbe;
    }

    public void setFamProbe(String famProbe) {
        this.famProbe = famProbe;
    }

    public String getVicProbe() {
        return vicProbe;
    }

    public void setVicProbe(String vicProbe) {
        this.vicProbe = vicProbe;
    }

    public String getRoxProbe() {
        return roxProbe;
    }

    public void setRoxProbe(String roxProbe) {
        this.roxProbe = roxProbe;
    }

    public String getCy5Probe() {
        return cy5Probe;
    }

    public void setCy5Probe(String cy5Probe) {
        this.cy5Probe = cy5Probe;
    }

    public int getTag() {
        return tag;
    }

    public void setTag(int tag) {
        this.tag = tag;
    }

    public int getAnalyzeType() {
        return analyzeType;
    }

    public void setAnalyzeType(int analyzeType) {
        this.analyzeType = analyzeType;
    }

    public int getExpMethod() {
        return expMethod;
    }

    public void setExpMethod(int expMethod) {
        this.expMethod = expMethod;
    }

    public List<ProgramStage> getPCRProgram() {
        return PCRProgram;
    }

    public void setPCRProgram(List<ProgramStage> PCRProgram) {
        this.PCRProgram = PCRProgram;
    }


    @Override
    public Object clone() {
        Object obj = null;
        try {
            obj = super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return obj;
    }
}